$(function () {
    var URL_QUERY = "";
    var ZZJGID = "1";
    $(window).resize(function () {
        $("#ttWrap").css({
            height: ($(window).innerHeight() - $("#ttWrap").offset().top - 10) + 'px',
            width: (($(window).innerWidth() - 20) + 'px')
        });
    }).resize();
    var query = function () {
        var list = [];
        for (var index = 0; index < 100; index++) {
            list.push({
                GJMC: "xxx", GSMC: "xxx", XMMC: "xxx",
                XMZT: "xxx", YZ: "xxx", CBS: "xxx",
                JSGM: "xxx", JHZTZE: "xxx", SJZTZE: "xxx",
                JHKGRQ: "xxx", JHGQ: "xxx", SJKGRQ: "xxx", SJGQ: "xxx"
            });
        }
        $("#tt").autoTable({
            data: list,
            header: [[{ title: '序号', span: [] }, { title: '国家公司', span: [] }, { title: '项目公司', span: [] },
                    { title: '项目名称', span: [] }, { title: '项目状态', span: [] },
                    { title: '业主', span: [] }, { title: '承包商', span: [] },
                    { title: '建设规模', span: [] }, { title: '计划总投资额', span: [] },
                    { title: '实际总投资额', span: [] }, { title: '计划开工日期', span: [] },
                    { title: '计划工期', span: [] }, { title: '实际开工日期 ', span: [] },
                    { title: '实际开期 ', span: [] }]],
            headerFields: ["GJMC", "GSMC", "XMMC", "XMZT", "YZ", "CBS",
                "JSGM", "JHZTZE", "SJZTZE", "JHKGRQ", "JHGQ", "SJKGRQ", "SJGQ"],
            isRownumber: true,
            isPageable: true,
            freezeContainer: "#ttWrap",
            isScrollable: true,
            isSelectable: true
        });
    };
    query();
});
